package com.zzyk.main.mapper;

import com.zzyk.main.model.pojo.CommonCount;import com.zzyk.main.model.pojo.Company;
import com.zzyk.main.model.vo.EnterpriseNode;import com.zzyk.main.model.vo.OrganizationInfo;import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;import java.util.List;

@Mapper
public interface CompanyMapper {
    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(Company record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(Company record);

    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    Company selectByPrimaryKey(Integer id);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(Company record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(Company record);

    /**
     * 根据参数模糊查询企业信息
     *
     * @param param
     * @param areas
     * @return
     */
    List<Company> selectCompanyByParam(@Param("param") String param, @Param("areas") String[] areas);

    /**
     * 统计企业数量
     *
     * @param areaArr
     * @return
     */
    CommonCount getTotal(@Param("areaArr") String[] areaArr);

    List<OrganizationInfo> getByIds(@Param("ids") String ids);

    EnterpriseNode getById(@Param("id") Integer id);
}